package com.bt.lms.ui.page.first.action;

import com.bt.lms.ui.page.common.PageCommon;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.scene.Scene;
import javafx.stage.Stage;

/**
 * 登录按钮的事件
 */
public class LogonBtn implements EventHandler<ActionEvent> {

    /**
     * 窗口
     */
    private final Stage stage;

    /**
     * 构建事件
     * @param stage 窗口
     */
    public LogonBtn(Stage stage) {
        this.stage =stage;
    }

    /**
     * 事件实现
     * @param event the event which occurred
     */
    @Override
    public void handle(ActionEvent event) {

        PageCommon pageCommon = new PageCommon();
        Scene scene = new Scene(pageCommon);
        stage.setScene(scene);

    }
}
